<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
</head>
<body>
	<div class="box">
		<% include components/top.ejs%>
		<div class="right_wrap">
			<form action="?" method="post" accept-charset="utf-8">
				标题：<input type="text" name='title' value="" /><br>

				描述：<textarea name='description'></textarea><br>

				链接：<input type="href" name='href' value="" /><br>

				<input type="submit" value="添加" />
			</form>


			<table border="1" width="100%" >
				<thead>
					<tr>
						<th>ID</th>
						<th>title</th>
						<th>description</th>
						<th>href</th>
					</tr>
				</thead>
				<tbody>
					<% for(var i=0;i<banners.length;i++){%>
					<tr>
						<td><%= banners[i].ID%></td>
						<td><%= banners[i].title%></td>
						<td><%= banners[i].description%></td>
						<td><%= banners[i].href%></td>
						<td><a href="?act=change&id=<%=banners[i].ID%>">修改</a><br>
							<a onclick="confirm('sff')" href="?act=del&id=<%=banners[i].ID%>">删除</a></td>
					</tr>
					<%}%>
				</tbody>
			</table>
			<% if(typeof change_data != 'undefined') {%>
			<div class="">
				<form action="?" method="post" accept-charset="utf-8">
					<input type="hidden" name="change_id" value="<%= change_data.ID%>">
					标题：<input type="text" name='title' value="<%= change_data.title%>" /><br>

					描述：<textarea name='description'><%= change_data.description%></textarea><br>

					链接：<input type="href" name='href' value="<%= change_data.href%>" /><br>

					<input type="submit" value="修改" />
				</form>
			</div>
			<%}%>
		</div>
	</div>
</body>
</html>
